﻿using System.Web;
using System.Web.Mvc;
using Deixei.Web.Filters;

namespace Deixei.Web
{
    public class FilterConfig
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());

            ActionLogFilterProvider provider = new ActionLogFilterProvider();
            provider.Add("*", "Home", "*");
            provider.Add("*", "Account", "*");
            provider.Add("*", "*", "Index");

            filters.Add(new ActionLogFilterAttribute()); 
            // now this a global FilterProviders.Providers.Add(provider);
            FilterProviders.Providers.Add(provider);
        }
    }
}